﻿Public Class XMLOps

    Private _error As String
    Public Property ErrorDetails() As String
        Get
            Return _error
        End Get
        Set(ByVal value As String)
            _error = value
        End Set
    End Property


    Public Function SaveXML(DT As DataSet, XML As String) As Boolean
        Try
            DT.WriteXml(XML)
            Return True
        Catch ex As Exception
            _error = ex.Message & vbCr & ex.StackTrace
            Return False
        End Try

    End Function

    Public Function LoadXML(DT As DataSet, XML As String) As Boolean
        Try
            DT.ReadXml(XML)
            Return True
        Catch ex As Exception
            _error = ex.Message & vbCr & ex.StackTrace
            Return False
        End Try

    End Function



End Class
